﻿using Domain.Entity;
using Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.AppService.CPCAppService
{
    public class CPCAppService : ICPCAppService
    {
        private readonly ICPCRepository cPCRepository;

        public CPCAppService(ICPCRepository cPCRepository)
        {
            this.cPCRepository = cPCRepository;
        }
        /// <summary>
        /// 根据属性种类查询
        /// </summary>
        /// <param name="AttributeKind"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public Task<List<CPC>> GetCPCAttributeKindAsync(string AttributeKind)
        {
          return cPCRepository.GetCPCAttributeKindAsync(AttributeKind);
        }
        //删除
       public Task<bool> DeleteCPCAsync(int id)
        {
          return cPCRepository.DeleteCPCAsync(id);
        }
        //查询全部
       public Task<List<CPC>> GetCPCAstnc()
        {
            return cPCRepository.GetCPCAstnc();
        }
        //新增
        public Task<bool> AddCPCAstnc(CPC cPC)
        {
            return cPCRepository.AddCPCAsync(cPC);

		}
    }
}
